Skip to content

Rohit/33#68

Open
rohitkumarxyz wants to merge 3 commits intocode100x:mainfrom
rohitkumarxyz:rohit/33
Open

Rohit/33#68
rohitkumarxyz wants to merge 3 commits intocode100x:mainfrom
rohitkumarxyz:rohit/33

Conversation

@rohitkumarxyz
Copy link

#33 issue number

Image Fetching Optimization

Changes Made

  1. Split image fetching into two APIs:

    • /images - Fetches all old images at once
    • /poll/images/:requestId - Fetches individual new images by ID
  2. State Management:

    • Switched to Zustand for managing request IDs
    • Tracks pending image generations
  3. Process:

    • Initial load: Fetches all old images
    • New generations: Polls individual images by ID
    • Updates UI in real-time as images are generated

Benefits

  • Reduced unnecessary data fetching
  • Better performance
  • Real-time updates for new generations

@skushagra9
Copy link

Yeah looks good overall, can add requests to another collection, just to make it cleaner, other than this good to go, will test this later once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants